# 插入排序
from __future__ import print_function


def insertion_sort(collection):
    """
    :param collection:
    :return: collection
    """
    for loop_index in range(1, len(collection)):
        insertion_index = loop_index  # 哨兵
        while insertion_index > 0 and collection[insertion_index - 1] > collection[insertion_index]:
            collection[insertion_index], collection[insertion_index - 1] = \
                collection[insertion_index - 1], collection[insertion_index]
            insertion_index -= 1

    return collection


if __name__ == '__main__':
    try:
        raw_input
    except NameError:
        raw_input = input

    user_input = raw_input('请输入数字用","隔开:\n').strip()
    unsorted = [int(item) for item in user_input.split(',')]
    print(insertion_sort(unsorted))
